package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.log.maidian.BaseLogEntity;

import java.util.Date;

@FieldTypeAnnotation(tableName = "t_l_activity_civil_get_reward", autoSave = true, dataUpload = true, eventName = "get_acc_reward")
public class LogActivityCivilGetReward extends BaseLogEntity {
    @FieldTypeAnnotation(desc = "活动Id", isIndex = true, dataAttribute = "activityid")
    private int activityId;
    @FieldTypeAnnotation(desc = "活动类型", dataAttribute = "type")
    private int type;
    @FieldTypeAnnotation(desc = "玩家ID", isIndex = true)
    private long userId;
    @FieldTypeAnnotation(desc = "目标玩家id", dataAttribute = "get_accuid")
    private long targetUserId;
    @FieldTypeAnnotation(desc = "任务ID", dataAttribute = "task_id")
    private int conditionId;
    @FieldTypeAnnotation(desc = "累计数", dataAttribute = "get_accnum")
    private int banquetAmount;
    @FieldTypeAnnotation(desc = "领取奖励", dataAttribute = "get_accreward")
    private String reward;
    @FieldTypeAnnotation(desc = "时间")
    private Date logTime;

    public LogActivityCivilGetReward(int activityId, int type, long userId, long targetUserId, int conditionId, int banquetAmount, String reward) {
        this.activityId = activityId;
        this.type = type;
        this.userId = userId;
        this.targetUserId = targetUserId;
        this.conditionId = conditionId;
        this.banquetAmount = banquetAmount;
        this.reward = reward;
        this.logTime = new Date();
    }

    @Override
    public long getUserId() {
        return userId;
    }
}
